from django.db import models

# Create your models here.


# 简历表
class Resume(models.Model):
    resume_id = models.AutoField(primary_key=True)
    user_id = models.CharField(max_length=36)  # 关联 User.user_id
    content = models.TextField()  # 简历内容
    parsed_data = models.JSONField()  # 提炼简历内容中的关键性信息（结构化数据）
    resume_path = models.CharField(max_length=255, null=True)  # 简历路径
    upload_time = models.DateTimeField(auto_now_add=True)  # 上传时间

    class Meta:
        db_table = 'resume'
        indexes = [models.Index(fields=['user_id'])]